package com.zz.parkingsystem.util;

import lombok.Data;
import lombok.ToString;
import java.io.Serializable;

/**
 * 封装的后端返回数据类
 */
@Data
@ToString
public class Result<T> implements Serializable {

    private Integer code;
    private String message;
    private T data;

    public Result() {
    }

    public Result(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Result(Integer code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }
}
